<template>
	<view class="">
		<u-card v-for="(item, index) in dataList" :key="index">
			<view class="" slot="head">
				<view class="u-flex u-flex-b u-font-16">
					<view class="u-flex u-font-14" @click="handleClick(item)">
						<image src="../../../static/icon/ic_type_location.png" style="width: 40rpx; height: 40rpx" class="u-m-r-20" mode=""></image>
						{{ item.name }}
					</view>
					<view class="u-flex u-font-14" :class="item.crewdata.status == '0' ?'success-color':'error-color'">
						{{ item.crewdata.status == '0' ? '正常' : '异常' }}
					</view>
				</view>
			</view>
			<view class="" slot="body">
				<view class="u-flex u-border u-m-b-10">
					<view class="u-border-right u-flex-1 u-p-14">
						<view class="u-m-b-10 u-font-12">
							<b class="u-font-16 u-m-r-10">{{ item.crewdata.instantaneous_flow }}m³/h</b>
							
						</view>
						<view class="u-font-12">瞬时流量</view>
					</view>
					<view class="u-flex-1 u-p-14">
						<view class="u-m-b-10 u-font-12">
							<b class="u-font-16 u-m-r-10">{{ item.crewdata.instantaneous_heat }}GJ/h</b>
							
						</view>
						<view class="u-font-12">瞬时热量</view>
					</view>
				</view>
				<view class="u-flex u-border u-m-b-10">
					<view class="u-border-right u-flex-1 u-p-14">
						<view class="u-m-b-10 u-font-12">
							<b class="u-font-16 u-m-r-10">{{ item.crewdata.supply_temp }}/{{ item.crewdata.back_temp }}°C</b>
							
						</view>
						<view class="u-font-12">一次供回温</view>
					</view>
					<view class="u-flex-1 u-p-14">
						<view class="u-m-b-10 u-font-12">
							<b class="u-font-16 u-m-r-10">{{ item.crewdata.supply_pre }}/{{ item.crewdata.back_pre }}MPa</b>
							
						</view>
						<view class="u-font-12">一次供回压</view>
					</view>
				</view>

				<view class="u-flex u-border u-m-b-10">
					<view class="u-border-right u-flex-1 u-p-14">
						<view class="u-m-b-10 u-font-12">
							<b class="u-font-16 u-m-r-10">{{ item.crewdata.supply_temp_t }}/{{ item.crewdata.back_temp_t }}°C</b>
							
						</view>
						<view class="u-font-12">二次供回温</view>
					</view>
					<view class="u-flex-1 u-p-14">
						<view class="u-m-b-10 u-font-12">
							<b class="u-font-16 u-m-r-10">{{ item.crewdata.supply_pre_t }}/{{ item.crewdata.back_pre_t }}MPa</b>
							
						</view>
						<view class="u-font-12">二次供回压</view>
					</view>
				</view>
				<view class="u-flex u-border u-m-b-10">
					<view class="u-border-right u-flex-1 u-p-14">
						<view class="u-m-b-10 u-font-12">
							<b class="u-font-16 u-m-r-10">{{ item.crewdata.value_opening }}%</b>
						</view>
						<view class="u-font-12">阀门开度</view>
					</view>
					<view class="u-flex-1 u-p-14">
						<view class="u-m-b-10 u-font-12">
							<b class="u-font-16 u-m-r-10">{{item.hot_area}}㎡</b>
						</view>
						<view class="u-font-12">供热面积</view>
					</view>
				</view>
			</view>
			<view class="" slot="foot">
				<view class="u-flex u-flex-e" >
					<u-icon name="clock" size="34" color=""></u-icon>
					<text class="u-font-13 u-m-l-10" :class="item.crewdata.status == '0' ? 'success-color' : 'error-color'">{{item.crewdata.get_time}}</text>
				</view>
			</view>
		</u-card>
	</view>
</template>

<script>
export default {
	data() {
		return {};
	},
	props: {
		dataList: {
			default: []
		}
	},
	methods: {
		handleClick(item) {
			uni.setStorageSync('marker_info', item);
			uni.switchTab({
				url: '/pages/index/index',
			});
		}
	}
};
</script>

<style lang="scss">
page {
	background-color: #ededed;
}
.icon_setUp {
	width: 187rpx;
	height: 32rpx;
	/* #ifdef MP */
	padding-left: 24rpx;
	/* #endif */
	/* #ifndef MP  */
	padding-right: 24rpx;
	/* #endif  */
	font-size: $uni-font-size-base;
	.icon_setUp_text {
		padding-left: 12rpx;
		line-height: 32rpx;
	}
}
.text-right {
	text-align: right;
	color: #2796f2;
}
.error-color {
	color: #fa3534;
}
.success-color {
	color: #19be6b;
}
</style>
